package com.supinfo.sun.sungamers.threads;

import java.util.Date;

/**
 * @author Liu, Bing(Locke)
 * @since 2011-04-05
 * @version 0.3
 */
public class DurationGameRunnable implements Runnable {
	private Date startDate;
	private Date endDate;

	public void run() {
		startDate = new Date(System.currentTimeMillis());
		System.out.println("startDate: " + startDate);

		synchronized(this) {
			try {
				wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

		endDate = new Date(System.currentTimeMillis());
		System.out.println("endDate : " + endDate);
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

}
